<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<script>
   
    function createPerson(name,qq) {//构造函数--->用来构造对象的函数

        this.name = name;
        this.qq = qq;

    }
    createPerson.prototype.showName=function(){
        alert("我的名字是："+this.name);
    }
    var obj1 =new createPerson('张三','747591335');
    var obj2 =new createPerson('李四','123456789');
    obj1.showName();
    obj2.showName();
</script>
</body>
</html>